home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / E-P-O.ZIP / TABLE.INC < prev    next >
Encoding:
Text File  |  1996-10-31  |  3.1 KB  |  104 lines

  1.  
  2. //------------------------------------------------------------------->
  3. //
  4. // table.inc
  5. //
  6. // "Easy POV Oven"
  7. //
  8. // Written By: Paul T. Dawson
  9. //             ptdawson@voicenet.com
  10. //             http://www.voicenet.com/~ptdawson
  11. //
  12. // All code and techniques are PUBLIC DOMAIN - have fun with it!
  13. //
  14. //------------------------------------------------------------------->
  15. //
  16. // This file builds the "Table" object.
  17. //
  18. //------------------------------------------------------------------->
  19. //
  20. // Make the two textures..
  21.  
  22.         #declare T_Board_1 =
  23.  
  24.                 // Bottom texture.
  25.                 texture { T_Wood14 rotate y * 90 scale < 10, 1, 1 > }
  26.  
  27.                 // Middle texture.
  28.                 texture {pigment { color rgbf < 1, 1, 1, 0.999 > }
  29.                         finish { Shiny brilliance 4} }
  30.  
  31.                 // Top texture.
  32.                 texture {pigment { color rgbf < 1, 1, 1, 0.999 > }
  33.                         finish { Shiny brilliance 4} }
  34.  
  35.         #declare T_Board_2 =
  36.  
  37.                 // Bottom texture.
  38.                 texture { T_Wood34 rotate y * 90 scale < 10, 1, 1 > }
  39.  
  40.                 // Middle texture.
  41.                 texture {pigment { color rgbf < 1, 1, 1, 0.999 > }
  42.                         finish { Shiny brilliance 4} }
  43.  
  44.                 // Top texture.
  45.                 texture {pigment { color rgbf < 1, 1, 1, 0.999 > }
  46.                         finish { Shiny brilliance 4} }
  47.  
  48. //------------------------------------------------------------------->
  49. //
  50. // Make two boards.
  51.  
  52.         #declare Board_1 = superellipsoid { < 0.05, 0.05 >
  53.  
  54.                 scale < 3.5*12, 1, 1 >
  55.  
  56.                 } // End of superellipsoid.
  57.  
  58.         #declare Board_2 = superellipsoid { < 0.05, 0.05 >
  59.  
  60.                 scale < 3.5*12, 1, 1 >
  61.  
  62.                 } // End of superellipsoid.
  63.  
  64. //------------------------------------------------------------------->
  65. //
  66. // Make one leg.
  67.  
  68.         #declare Table_Leg = cone { < 0,0,0>,1 <0,28,0>,1.3
  69.  
  70.                 texture { T_Gold_1A }
  71.                 normal { crackle 0.1 scale 0.1 }
  72.  
  73.                 } // End of cone.
  74.  
  75. //------------------------------------------------------------------->
  76. //
  77. // Build it!
  78.  
  79.         #declare Table = union {
  80.  
  81.                 #declare Z = -2*12 #while ( Z < 2*12 )
  82.  
  83.                         object { Board_1
  84.                                 translate < 0, 29, Z >
  85.                                 texture { T_Board_1 translate x*(Z*30) } }
  86.  
  87.                         object { Board_2
  88.                                 translate < 0, 29, Z+2 >
  89.                                 texture { T_Board_2 translate x*(Z*30) } }
  90.  
  91.                 #declare Z = Z + 4 #end
  92.  
  93.                 object { Table_Leg translate < -3*12, 0, -1.7*12 > }
  94.                 object { Table_Leg translate < -3*12, 0,  1.7*12 > }
  95.                 object { Table_Leg translate <  3*12, 0, -1.7*12 > }
  96.                 object { Table_Leg translate <  3*12, 0,  1.7*12 > }
  97.  
  98.         } // End of union.
  99.  
  100. //------------------------------------------------------------------->
  101. //
  102. // End of this file.
  103.  
  104.